package com.freework.sys.table.vo;

import java.util.List;
import java.util.Map;



public class PageGridVO  implements java.io.Serializable{

	List<Map> colModel=null;
	List<Map> dataRecord=null;
	
	
	
	
	public List<Map> getColModel() {
		return colModel;
	}
	public void setColModel(List<Map> colModel) {
		if(colModel==null)
			return;
		for (Map map : colModel) {
			map.put("width", Integer.parseInt(map.get("width").toString()));
			//
			Object hidden=map.get("hidden");
			Object checksortable=map.get("checksortable");
			map.remove("checksortable");
			if(checksortable!=null)
				map.put("sortable", Boolean.valueOf(checksortable.toString()));
			if(hidden!=null)
				map.put("hidden",  Boolean.valueOf(hidden.toString()));
		}
		this.colModel = colModel;
	}
	public List<Map> getDataRecord() {
		return dataRecord;
	}
	public String dataRecordJSON(){
		return com.alibaba.fastjson.JSON.toJSONString(dataRecord);
	}
	public String colModelJSON(){
		return com.alibaba.fastjson.JSON.toJSONString(colModel);
	}
	
	public void setDataRecord(List<Map> dataRecord) {
		this.dataRecord = dataRecord;
	}

}
